package com.xml.dom.read;

import java.io.IOException;
import java.util.List;

import javax.xml.parsers.ParserConfigurationException;

import org.xml.sax.SAXException;


public class ReadXMLSample {

	/**
	 * @param args
	 * @throws ParserConfigurationException 
	 * @throws IOException 
	 * @throws SAXException 
	 */
	public static void main(String[] args) throws SAXException, IOException, ParserConfigurationException {
		XMLScanner scanner = new XMLScanner("book.xml");
		List<BookDTO> books = scanner.scan();
		CSVWriter writer = new CSVWriter(books);
		writer.write("book.csv");
	}

}
